package com.jy.wms.web;

import com.jy.wms.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ProjectName:
 * @Package: com.jy.wms.web
 * @ClassName: wmsSendCategoryRouter
 * @Description: 码盘
 * @Author: xmx
 * @CreateDate: 2018/7/26 14:01
 * @UpdateUser: 更新者
 * @UpdateDate: 2018/7/26 14:01
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */

@Controller
@RequestMapping("inOperation/mapan")
public class wmsMapanRouter {
    @Autowired
    SysMenuService menuService;

    //主页面
    @RequestMapping(value = "/toMainPage/{menu}")
    public String toMainPage(@PathVariable("menu") String menu, Model model) {

        model.addAttribute("functions",menuService.getFunctions(menu));

        return "inOperation/mapan/mainPage";
    }
    //增加页面
    @RequestMapping(value = "/add")
    public String addSendCategory() {
        return "mapan/addCategory";
    }

    /*跳转到修改页面*/
    @RequestMapping(value = "/editCategory")
    public String editKq(String id, Model model) {
        model.addAttribute("id",id);
        return "inOperation/mapan/editCategory";
    }
    /*跳转到详情页面*/
    @RequestMapping(value = "/detailMapan")
    public String getFindKq(String id, Model model) {
        System.out.println("id："+id);
        model.addAttribute("id",id);
        return "inOperation/mapan/detailMapan";
    }
    // 看码盘明细
    @RequestMapping(value = "toChakanMp")
    public String toChakanKw(String id,Model model){
        model.addAttribute("id",id);
        return  "inOperation/mapan/chakanMp";
    }
}
